package com.maisuiit.genericity;

import java.util.Random;

/**
 * @author zhangcc
 * @date 2022-02-15
 */
public class FruitGenerator2 implements com.maisuiit.genericity.Generator<String> {

    private String[] fruits = new String[]{"Apple", "Banana", "Pear"};
    @Override
    public String next() {
        Random rand = new Random();
        return fruits[rand.nextInt(3)];
    }

}
